package controllers

import (
	"github.com/astaxie/beego"
	"oneproject/models"
)

type MainController struct {
	beego.Controller
}

type PageController struct {
	beego.Controller
}

func (this *MainController) Get() {
	this.Data["Website"] = "beego.me"
	this.Data["Email"] = "astaxie@gmail.com"
	this.TplNames = "index.tpl"
}

func (this *PageController) Get() {

	data, rs := models.GetUserData()

	if rs > 0 {
		this.Data["result"] = data
	}

	this.TplNames = "page.tpl"

}
